import request from "@/network/request.js";

function RegUpImg(data){
    return request({
        url:'/upload/upload',
        method:'post',
        Headers:{
            'content-type':'multipart/form-data'
        },
        data:data
     })
 }
 function RegEmail(data){
    return request({
        url:'/email/send',
        method:'post',
        data:data
     })
 }
 function RegEmailCheck(data){
    return request({
        url:'/email/checkcode',
        method:'post',
        data:data
     })
 }
 function RegClick(data){
    return request({
        url:'/users/register',
        method:'post',
        data:data
     })
 }
 
 let headers = {
    'auth': localStorage.getItem('token')
}
 function EditRegPwd(data){
    return request({
        url:'/users/edit',
        method:'post',
        data:data,
        headers
     })
 }
 export  {RegUpImg ,RegEmail,RegEmailCheck,RegClick,EditRegPwd}